package com.czp.infosharingplatformapp.dto;

import com.czp.infosharingplatformapp.model.PostTag;
import jakarta.validation.constraints.NotNull;

import java.util.List;

public class PostRequest {

    @NotNull(message = "标题不能为空")
    private String title;

    @NotNull(message = "内容不能为空")
    private String content;

    @NotNull(message = "userId 不能为空")
    private Long userId;

    @NotNull(message = "categoryId 不能为空")
    private Long categoryId;

    @NotNull(message = "PostTags 不能为空")
    private List<PostTag> tags;

    private Long resourceId; // 资源的 ID，可为空（不强制）

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public List<PostTag> getTags() {
        return tags;
    }

    public void setTags(List<PostTag> tags) {
        this.tags = tags;
    }

    public Long getResourceId() {
        return resourceId;
    }

    public void setResourceId(Long resourceId) {
        this.resourceId = resourceId;
    }
}